monitor=,preferred,auto,1

# See https://wiki.hyprland.org/Configuring/Keywords/ for more

exec-once = swayidle -w timeout 300 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' timeout 600 'systemctl suspend' after-resume 'hyprctl dispatch dpms on && swaylock'

exec-once = nm-applet 
exec-once = blueman-applet

exec = killall -9 -q waybar
exec = waybar

exec = ~/.config/nixos/modules/hyprland/scripts/wal.sh

input {
    kb_layout = us,ru
    kb_options = grp:alt_shift_toggle
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 20
    border_size = 3
    col.active_border = 0xffb4befe
    col.inactive_border = 0xff1e1e2e
В
    layout = dwindle
}

misc {
    disable_hyprland_logo = true
    enable_swallow = true
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 5
    blur = yes
    blur_size = 3
    blur_passes = 1
    blur_new_optimizations = on

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    #col.shadow = rgb($color1)

    dim_inactive = 1
    dim_strength = 0.4
}

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 5, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = fade, 1, 4, default
    animation = workspaces, 1, 6, default
}

dwindle {
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    new_is_master = true
}

gestures {
    workspace_swipe = on
}

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more

# System bind
binde=, XF86AudioRaiseVolume, exec, ~/.config/nixos/modules/hyprland/scripts/volume.sh up
binde=, XF86AudioLowerVolume, exec, ~/.config/nixos/modules/hyprland/scripts/volume.sh down

binde=, XF86AudioMute, exec, ~/.config/nixos/modules/hyprland/scripts/volume.sh mute
binde=, XF86AudioMicMute, exec , wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle

binde=, XF86MonBrightnessUp, exec,  ~/.config/nixos/modules/hyprland/scripts/brightness.sh up
binde=, XF86MonBrightnessDown, exec, ~/.config/nixos/modules/hyprland/scripts/brightness.sh down 

bind = $mainMod SHIFT , F10 , exec , systemctl suspend
bind = $mainMod SHIFT , F11 , exec , systemctl reboot
bind = $mainMod SHIFT , F12 , exec , systemctl poweroff

bind = $mainMod SHIFT , L , exec , swaylock

# Start apps
bind = $mainMod , RETURN , exec,foot 
bind = $mainMod SHIFT , Q , killactive, 
bind = $mainMod SHIFT , B , exec, thunar
bind = $mainMod SHIFT , H , exec, foot -e btop
bind = $mainMod SHIFT , A , exec, foot -e ranger
bind = $mainMod SHIFT , I , exec, foot -e nvim ./hyprland.conf
bind = $mainMod , R , exec, wofi --show drun --width 550 --height 810 -I
bind = $mainMod , T , exec, ~/.config/nixos/modules/hyprland/scripts/wal.sh -s

# Screenshots
bind=,Print , exec , slurp | grim -g - - | wl-copy
bind=$mainMod , Print , exec , grim - | wl-copy
bind=SUPER , G , exec , wf-recorder -g "$(slurp)" -f /dev/shm/$(date +'%Y-%m-%d-%H%M%S.mp4') -c h264_vaapi -d /dev/dri/renderD128
bind=SUPER_SHIFT , g , exec , kill -INT wf-recorder

#Yt-dlp
bind=$mainMod , D , exec , ~/.config/nixos/modules/hyprland/scripts/yt-dlp.sh
bind=$mainMod SHIFT , D , exec , ~/.config/nixos/modules/hyprland/scripts/yt-dlp.sh -c

#Tiling mods
bind=SUPER,F,fullscreen,0
bind = $mainMod, V, togglefloating, 
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

#Red shift
bind=$mainMod ,N , exec ,  redshift -P -O 4500
bind=$mainMod SHIFT , N , exec , pkill redshift

#Monitors
#bind=$mainMod , E , exec , hyprctl dispatch dpms on eDP-1
#bind=$mainMod D , exec , hyprctl dispatch dpms off eDP-1

#bind=$mainMod SHIFT , E , exec , hyprctl dispatch dpms on HDMI-A-1
#bind=$mainMod SHIFT , D , exec , hyprctl dispatch dpms off HDMI-A-1

windowrule=float,thunar
windowrule=float,virt-manager
windowrule=float,feh
windowrule=float,nekoray
windowrule=float,Wireshark
windowrule=float,blueman-manager
windowrule = float, file_progress
windowrule = float, confirm
windowrule = float, dialog
windowrule = float, download
windowrule = float, notification
windowrule = float, error
windowrule = float, splash
windowrule = float, confirmreset
windowrule = float, title:Open File
windowrule = float, title:branchdialog

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bind = $mainMod CTRL, left, resizeactive,-50 0
bind = $mainMod CTRL, right, resizeactive,50 0
bind = $mainMod CTRL, up, resizeactive,0 -50
bind = $mainMod CTRL, down, resizeactive,0 50

bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
